<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
        <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String userid=request.getParameter("userid");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<base href="http://api.xszhuan.com/TianciXSZ/">--><base href=".">
<meta charset="utf-8">
<title>有钱赚互动交流</title>
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1,initial-scale=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<meta content="false" id="twcClient" name="twcClient">
<link href="<%=basePath %>interact/css/hy.css" rel="stylesheet" type="text/css">
<!--基本数据定义-->
<script type="text/javascript">

    //加载数据
    function loaddata(url,maxsize,currentpage){
        $.post(url,{random:Math.random(),maxsize:maxsize,currentpage:currentpage},function(rs){

            var msg=eval("("+rs+")");

            var cont=msg;

            var contnet=cont.replace(/\\"/g, "\'");
            var c=eval("("+contnet+")");

            init(c.msg);

            document.getElementById("mycurrentpage").value = currentpage;
        });
    }

	window.onload=function(){


        loaddata("<%=basePath %>interactController/getinteractlist",$("#totalCount").val(),$("#mycurrentpage").val());

		var json = document.getElementById("json").value;
	//		init(json);

	        $("#hy-more").on("click",
	       			 function() {
	            var e = $(this);

	            e.addClass("btnloading");

	        	var totalCount =  document.getElementById("totalCount").value;
                         alert($("#mycurrentpage").val());
	        	var currentpage =  parseInt(document.getElementById("mycurrentpage").value)+1;


	          $.post("<%=basePath %>interactController/getinteractlist",{random:Math.random(),maxsize:totalCount,currentpage:currentpage},function(rs){

                     var msg=eval("("+rs+")");
                     var cont=msg;
                     var contnet=cont.replace(/\\"/g, "\'");

                     var c=eval("("+contnet+")");

                     if(c.msg.length<=0){
                         e.html("没有了");
                     }else{
                         init(c.msg);
                     }

                     document.getElementById("mycurrentpage").value = currentpage;
                 });

	            e.removeClass("btnloading");
	        });

	        //init();
	}
	function gotoArtList(d){
		location.href="<%=basePath%>interact/detail.jsp?date="+d+"&userid=<%=userid%>";
	}
	function init(json){

		console.info(json);
		var obj = json;//eval("("+json+")");

		var month;
		var day;
		var publishtime;

		for(var i=0;i<obj.length;i++){


			publishtime=obj[i].publishtime;

			var timeday=publishtime.split("-");
			month=timeday[0];
			day=timeday[1];

			var title=obj[i].title;
			if(title==undefined){
				title="";
			}

            var str ='<li class="daily clearfix"  style="background: url(<%=basePath %>interact/images/time-tree-320.png) no-repeat -1px -911px;"><a href="javascript:gotoArtList(\''+obj[i].publishtime+'\')" class="imgon clearfix">'+
            '			<div class="clearfix">'+
            '				<div class="context">'+
            '					<h2>'+title+'</h2>'+
            '					<p>'+
            '						'+obj[i].content+
            '					</p>'+
            '				</div>'+
            '				<img src="<%=basePath %>interact/images/loading2.gif " xSrc="'+obj[i].imageurl+'"  >'+
            '			</div>'+
            '			<div class="conact">'+
            '				<span class="ico-h1600 concount" style="background: url(<%=basePath %>interact/images/all-ico-320.png?t=1) no-repeat 0 -1548px;"><em>'+obj[i].commentcout+'</em></span><span class="ico-h850 concount" style="background: url(<%=basePath %>interact/images/all-ico-320.png?t=1) no-repeat 2px -848px;"><em>'+obj[i].likecount+'</em></span>'+
            '			</div>'+
            '			</a>'+
            '			<div class="time" id="d1020">'+
            '				<p class="month">'+
            '					'+month+ '月'+
            '				</p>'+
            '				<span class="day">'+day+ '日</span>'+
            '			</div>'+
            '			</li>';
            $("#hy-list").append(str);

		}
		 scrollLoad();
	}

	function show_msg(s){
		var pre = document.getElementById("pre");
		pre.style.display = "block";

		var out = document.getElementById("out");
		out.innerHTML= s;
		setTimeout("clear_msg()",3000);
	}
	function clear_msg(){

		var pre = document.getElementById("pre");
		pre.style.display = "none";

	}
</script>


<script type="text/javascript">
    var scrollLoad = (function (options) {
        var defaults = (arguments.length == 0) ? { src: 'xSrc', time: 300} : { src: options.src || 'xSrc', time: options.time ||300};
        var camelize = function (s) {
            return s.replace(/-(\w)/g, function (strMatch, p1) {
                return p1.toUpperCase();
            });
        };
        this.getStyle = function (element, property) {
            if (arguments.length != 2) return false;
            var value = element.style[camelize(property)];
            if (!value) {
                if (document.defaultView && document.defaultView.getComputedStyle) {
                    var css = document.defaultView.getComputedStyle(element, null);
                    value = css ? css.getPropertyValue(property) : null;
                } else if (element.currentStyle) {
                    value = element.currentStyle[camelize(property)];
                }
            }
            return value == 'auto' ? '' : value;
        };
        var _init = function () {
            var offsetPage = window.pageYOffset ? window.pageYOffset : window.document.documentElement.scrollTop,
                offsetWindow = offsetPage + Number(window.innerHeight ? window.innerHeight : document.documentElement.clientHeight),
                docImg = document.images,
                _len = docImg.length;
            if (!_len) return false;
            for (var i = 0; i < _len; i++) {
                var attrSrc = docImg[i].getAttribute(defaults.src),
                    o = docImg[i], tag = o.nodeName.toLowerCase();
                if (o) {
                    postPage = o.getBoundingClientRect().top + window.document.documentElement.scrollTop + window.document.body.scrollTop; postWindow = postPage + Number(this.getStyle(o, 'height').replace('px', ''));
                    if ((postPage > offsetPage && postPage < offsetWindow) || (postWindow > offsetPage && postWindow < offsetWindow)) {
                        if (tag === "img" && attrSrc !== null) {
                            o.setAttribute("src", attrSrc);
                        }
                        o = null;
                    }
                }
            };
            window.onscroll = function () {
                setTimeout(function () {
                    _init();
                }, defaults.time);
            }
        };
        return _init();
    });

</script>
<style>#haloword-pron { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -94px -34px; }#haloword-pron:hover { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -111px -34px; }#haloword-open { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -94px -17px; }#haloword-open:hover { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -111px -17px; }#haloword-close { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -94px 0; }#haloword-close:hover { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -111px 0; }#haloword-add { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -94px -51px; }#haloword-add:hover { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -111px -51px; }#haloword-remove { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -94px -68px; }#haloword-remove:hover { background: url(chrome-extension://bhkcehpnnlgncpnefpanachijmhikocj/img/icon.svg) -111px -68px; }</style></head>
<body>

<input type="hidden" value="学生2141749" id="nickname">
<input type="hidden" value="2141749" id="userId">
<input type="hidden" value="" id="sso">

<input type="hidden" value="0" id="type_id">
<input type="hidden" value="[{ &#39;strDate&#39;:&#39;2014-04-08&#39;,&#39;month&#39;:&#39;4&#39;,&#39;date&#39;:&#39;8&#39;,&#39;comment_count&#39;:&#39;19625&#39;, &#39;laud_count&#39;:&#39;49009&#39;, &#39;title&#39;:&#39;吃完发现是走错包间&#39;,  &#39;title_url&#39;:&#39;http://adwall.xszhuan.com:9090///downLoadApi?folder=article&amp;fileId=8CFA9586757694996AD43963D6936F94.jpg&#39;,&#39;content&#39;:&#39;大学同学聚会时，发现都叫不上来名字，不禁感慨自己当年逃课太多。吃完发现是走错包间&#39;},{ &#39;strDate&#39;:&#39;2014-03-28&#39;,&#39;month&#39;:&#39;3&#39;,&#39;date&#39;:&#39;28&#39;,&#39;comment_count&#39;:&#39;26752&#39;, &#39;laud_count&#39;:&#39;74597&#39;, &#39;title&#39;:&#39;一招新技能，教你如何拆散天天秀恩爱的情侣&#39;,  &#39;title_url&#39;:&#39;http://www.xszhuan.com///downLoadApi?folder=article&amp;fileId=65BD32BF61F8AB0496FB67C35DE0F55A.jpg&#39;,&#39;content&#39;:&#39;一招新技能，教你如何拆散天天秀恩爱的情侣&#39;},{ &#39;strDate&#39;:&#39;2014-03-26&#39;,&#39;month&#39;:&#39;3&#39;,&#39;date&#39;:&#39;26&#39;,&#39;comment_count&#39;:&#39;22916&#39;, &#39;laud_count&#39;:&#39;71211&#39;, &#39;title&#39;:&#39;。急，在线等。。。&#39;,  &#39;title_url&#39;:&#39;http://www.xszhuan.com///downLoadApi?folder=article&amp;fileId=0CED74C4C7075F89D7E20A3F4A846D2F.jpg&#39;,&#39;content&#39;:&#39;在图书馆看书，结果脱鞋。。。。哎呀~~(╯﹏╰)b 怎么办好。。急，在线等。。。&#39;},{ &#39;strDate&#39;:&#39;2014-03-24&#39;,&#39;month&#39;:&#39;3&#39;,&#39;date&#39;:&#39;24&#39;,&#39;comment_count&#39;:&#39;20963&#39;, &#39;laud_count&#39;:&#39;66781&#39;, &#39;title&#39;:&#39;哈哈哈哈哈哈哈哈酷炫至极&#39;,  &#39;title_url&#39;:&#39;http://www.xszhuan.com///downLoadApi?folder=article&amp;fileId=DC6A6086033367F6C3D2D0B0DDAA0C79.jpg&#39;,&#39;content&#39;:&#39;哈哈哈哈哈哈哈哈酷炫至极&#39;},{ &#39;strDate&#39;:&#39;2014-03-22&#39;,&#39;month&#39;:&#39;3&#39;,&#39;date&#39;:&#39;22&#39;,&#39;comment_count&#39;:&#39;26507&#39;, &#39;laud_count&#39;:&#39;80955&#39;, &#39;title&#39;:&#39;那就卖身吧&#39;,  &#39;title_url&#39;:&#39;http://www.xszhuan.com///downLoadApi?folder=article&amp;fileId=D827B030DD19263882DAF9E44085F6AF.jpg&#39;,&#39;content&#39;:&#39;“这二十万你拿去交学费。”听到总裁不容拒绝的语气，她急红了脸：“啊不可以！我虽然家里穷，但是也不能要你的钱！”“没关系，当我借给你好了，等你有钱再还我。”“啊……可是我没钱……”“那就卖身吧，嗯？”总裁挑起她的下巴邪魅一笑。她不禁沉醉，羞赧地点了点头。然后总裁就把她送到了夜总会。&#39;}]" id="json">
<input type="hidden" value="10" id="totalCount">
<input type="hidden" value="1" id="mycurrentpage">

<div class="layout" id="layout" style="width: 100%;">
<pre id="pre" style="display:none; width: 70%;margin-left: 15%;position: absolute; bottom:0px; left: 0px;z-index: 1000;"><code><output id="out" style="color: red;">
竞猜成功!请等待开奖
</output></code></pre>
	<header class="css-reset lay-header-tl" style="background-color: #f0f0f0;height: 100px; ">

  <div style="width: 100%;height: 100px;">
	<div class="text" style="margin-top: 18px;">
		<h1>有钱赚互动广场
		<!--<span>微信号：lengiii</span>-->
		</h1>
		<p>
			广场收集网络上最火爆的笑话精选，绝对是您居家旅行、行走江湖的必备猛药！发表评论或者点击喜欢均有学币送上喔
		</p>
	</div>
	<div class="headimg" style="margin-top: 17px;">
		<img src="<%=basePath %>interact/images/art_log.png" alt="头像">
	</div>
	</div>
	</header>
	<!--lay-header-->
	<div class="lay-main">
		<section class="lay-art tl-box css-reset">
		<ul class="tl-ball" id="hy-list">


		</ul>
		<a href="javascript:void(0);" class="lookmore" id="hy-more" data-page="2">再看几条</a><span class="toppoint"></span></section>
		<!--lay-art-->
	</div>
	<!--lay-main-->
	<!--<div style="border-bottom: 1px solid #E8E8E8; margin:0 10px 10px 10px;"></div>-->
	<!--  <a class="aboutus" href="#"></a>-->
	<!--aboutus-->
</div>




<script src="<%=basePath %>interact/js/jquery.min.js">

</script><div id="haloword-lookup" class="ui-widget-content ui-draggable"><div id="haloword-title"><span id="haloword-word"></span><a herf="#" id="haloword-pron" class="haloword-button" title="发音"></a><audio id="haloword-audio"></audio><div id="haloword-control-container"><a herf="#" id="haloword-add" class="haloword-button" title="加入单词表"></a><a herf="#" id="haloword-remove" class="haloword-button" title="移出单词表"></a><a href="http://api.xszhuan.com/TianciXSZ/#" id="haloword-open" class="haloword-button" title="查看单词详细释义" target="_blank"></a><a herf="#" id="haloword-close" class="haloword-button" title="关闭查询窗"></a></div><br style="clear: both;"></div><div id="haloword-content"></div></div></body></html>